import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class Main {
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        String dateStr = sdf.format(new Date());

        Random rand = new Random();
        int sequence = rand.nextInt(9000) + 1000;

        String orderId = dateStr + sequence;
        System.out.println("生成的订单编号为：" + orderId);
    }
}